import request from '@/utils/request'

// 登录
var getLogin = function(e){
  return request.getRequest( "/api/user/login",e)
}
// 微信登录
var loginByOpenid = function(e){
  return request.getComRequest( "/api/user/loginByOpenid",e)
}
// 注册
var getRegister = function(e){
  return request.postRequest( "/api/user/register",e)
}
// 案件列表，案件详情
var getCaseList = function(e){
  return request.getComRequest( "/api/case",e)
}
// 新增案件
var getCreateCase = function(e){
  return request.postRequest( "/api/case",e)
}
// 新增记录
var getCreateRecord = function(e){
  return request.postRequest( "/api/record",e)
}
// 当事人修改
var partyUpdate = function(e){
  return request.putRequest( "/api/participant",e)
}
// 当事人新增
var partyAdd = function(e){
  return request.postRequest( "/api/participant",e)
}
// 获取用户信息
var getUserInfo = function(e){
  return request.getComRequest( "/api/user/info",e)
}
module.exports = {
	getLogin,
	loginByOpenid,
	getCreateCase,
	getCreateRecord,
	getCaseList,
	partyUpdate,
	partyAdd,
	getRegister,
	getUserInfo
}